package banking9;

import banking9.Customer;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:恋恋
 * Date:2022-11-17
 * Time:14:46
 */
public class Bank {
    List<Customer> customers = new ArrayList<>();
    //Bank构造器也应该是私有的
    public Bank() {
        List<Customer> customers = new ArrayList<>();
        this.customers = customers;
    }
//    public Bank (){
//        this(customers);
//    }

    public  List<Customer> getCustomers() {
        return customers;
    }

    public Boolean addList (String firstName , String lastName){
        Customer customer = new Customer(firstName , lastName);
        return this.customers.add(customer);
    }
    public Customer getList (int i){
        return customers.get(i);
    }
    public int getCustomerNumber (){
        return customers.size();
    }


}
